package com.vue.vuedemo.map;

import com.vue.vuedemo.pojo.News;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NewsMapper {
    @Select("select id,title,add_time,zhaiyao,click,img_url from news")
    public List<News> getAllNews();

    @Select("select * from news where id=#{id}")
    public News getNewInfo(Integer id);
}
